<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html>
<jsp:useBean id="dateValue" class="java.util.Date"/>
<jsp:setProperty name="dateValue" property="time" value="${procudtOrderHeader.gmtCreate}"/>
<%--<jsp:setProperty name="finishTime" property="time" value="${procudtOrderHeader.productOrderPaymentRecord.finishTime}"/>--%>
<head>
    <%@include file="../../../../resources/inc/head.jsp" %>
</head>
<body style="overflow:auto">
<div class="layui-container">
    <div class="layui-row">


        <div class="layui-card">
            <div class="layui-card">
                <div class="layui-card-header">订单详情</div>
            </div>
            <table class="layui-table">
                <colgroup>
                    <col width="150">
                    <col>
                    <col width="150">
                    <col>
                </colgroup>
                <tr>
                    <th>快捷订单号</th>
                    <th>${procudtOrderHeader.orderId}</th>
                    <th>商户订单号</th>
                    <th>${procudtOrderHeader.merchantOrderId}</th>
                </tr>
                <tbody>
                <tr>
                    <td>交易类型</td>
                    <td>${procudtOrderHeader.productOrderPaymentRecord==null?'':procudtOrderHeader.productOrderPaymentRecord.channelPaywayName}</td>
                    <td>通道单号</td>
                    <td>${procudtOrderHeader.productOrderPaymentRecord==null?'':procudtOrderHeader.productOrderPaymentRecord.tradeNo}</td>
                </tr>
                <tr>
                    <td>订单金额</td>
                    <td>${procudtOrderHeader.grandTotal}</td>
                    <td>商户手续费</td>
                    <td>${procudtOrderHeader.serviceFee==null?'0':procudtOrderHeader.serviceFee}</td>
                </tr>
                <tr>
                    <td>退款金额</td>
                    <td></td>
                    <td>状态</td>
                    <td>${procudtOrderHeader.orderStatus==0?'<span class="layui-badge">待付款</span>':procudtOrderHeader.orderStatus==1?'<span class="layui-badge layui-bg-green">已支付</span>':'<span class="layui-badge layui-bg-orange">支付失败</span>'}</td>
                </tr>
                <tr>
                    <td>结算金额</td>
                    <td>${procudtOrderHeader.grandTotal-procudtOrderHeader.serviceFee}</td>
                    <td>支付通道</td>
                    <td>${procudtOrderHeader.productOrderPaymentRecord==null?'':procudtOrderHeader.productOrderPaymentRecord.paymentChannel==null?'':procudtOrderHeader.productOrderPaymentRecord.paymentChannel.name}</td>
                </tr>
                <%--<tr>--%>
                <%--<td>支付类型</td>--%>
                <%--<td></td>--%>
                <%--<td>结算周期</td>--%>
                <%--<td>${procudtOrderHeader.productOrderPaymentRecord==null?'':procudtOrderHeader.productOrderPaymentRecord.paymentChannel==null?'':procudtOrderHeader.productOrderPaymentRecord.paymentChannel.settlementCycle}</td>--%>
                <%--</tr>--%>
                <tr>
                    <td>发起时间</td>
                    <td><fmt:formatDate value="${dateValue}" pattern="yyyy-MM-dd hh:mm:ss"/></td>
                    <td>完成时间</td>
                    <c:if test="${procudtOrderHeader.productOrderPaymentRecord.finishTime!=''&& procudtOrderHeader.productOrderPaymentRecord.finishTime!=null}">
                        <jsp:useBean id="finishTime" class="java.util.Date"/>
                        <jsp:setProperty name="finishTime" property="time" value="${procudtOrderHeader.productOrderPaymentRecord.finishTime}"/>
                    </c:if>
                    <td><fmt:formatDate value="${finishTime}" pattern="yyyy-MM-dd hh:mm:ss"/></td>
                </tr>
                </tbody>
            </table>
            <table class="layui-table">
                <colgroup>
                    <col width="150">
                    <col>
                </colgroup>
                <tr>
                    <td>商品名称</td>
                    <td>${procudtOrderHeader.orderName}</td>
                </tr>
                <tr>
                    <td>商品描述</td>
                    <td>${procudtOrderHeader.orderDesc}</td>
                </tr>
                <tr>
                    <td>备注</td>
                    <td colspan="3">-</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <%@include file="../../../../resources/inc/footer.jsp" %>
    <script>
        layui.config({
            base: '<%=basePath%>resources/lib/layuiAdmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['laydate', 'index', 'table'], function () {
            var $ = layui.$
                , form = layui.form
                , table = layui.table,
                laydate = layui.laydate;
        });

        function edit(e) {

        }

    </script>
</body>
</html>

